#include<bits/stdc++.h>
using namespace std;
const int N = 1e6+5; 
int n,f[N],out[N],son[N],siz[N],yz[3],cnt;
bool vis[N];
vector<int> g[N];
void build(int u,int fa)
{
	f[u] = fa,siz[u] = 1;
	for(auto &v:g[u])
	{
		if(v==fa) continue;
		build(v,u);
		siz[u]+=siz[v];
	}
	if(siz[u]==1) yz[++cnt] = u;
}
void print()
{
	for(int i = 1;i<=n;i++)
		cout<<out[i]<<' ';
	exit(0);
}
int getmx()
{
	for(int i = n;i>=1;i--)
		if(son[i]==0&&vis[i]==1)
			return i;
}
void dfs(int x)
{
	if(x>n) return print(),void();
	for(int i = 1;i<=n;i++)
		if(vis[i]==0&&vis[f[i]]==1)
		{
			out[x] = i;
			son[f[i]]++;
			vis[i] = 1;
			if(getmx()>i)
			{
				son[f[i]]--,vis[i] = 0;
				continue;
			}
			dfs(x+1);
			vis[i] = 0;
		}
}
int stk[N],top;
void Print(int x,int y)
{
	top = 0;
	while(y!=x) stk[++top] = y,y = f[y];
	while(top) cout<<stk[top--]<<' ';
}
signed main()
{
	freopen("choice.in","r",stdin);
	freopen("choice.out","w",stdout);
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	cin>>n;
	for(int i = 1,x,y;i<n;i++)
		cin>>x>>y,g[x].push_back(y),g[y].push_back(x);
	build(1,0);
	if(n<=10)
	{
		vis[1] = 1,out[1] = 1;
		dfs(2);
		return cout<<-1,0;
	}
	cout<<"1 ";
	if(cnt==1)
		return Print(1,yz[1]),0;
	if(yz[1]>yz[2]) swap(yz[1],yz[2]);
	Print(1,yz[1]),Print(1,yz[2]);
	return 0;
}

